<?php

namespace App\Domain\Visitlist\Requests;

use Illuminate\Foundation\Http\FormRequest;

class createVisitlistPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'memberId' => 'required|string',
            'description' => 'required|string',
            'date' => 'required',
            'diagnosls' => 'required',
            'room' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'memberId.required' => '用户ID必填',
            'description.required' => '描述必填',
            'date.required' => '就诊时间必填',
            'diagnosls.required' => '诊断必填',
            'room.required' => '科室必填',
        ];
    }
}
